package com.tencent.sr.iris.basic.saas.service.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.tencent.sr.iris.activity.interfaces.response.group.operate.UnJoinTaskResponse;
import com.tencent.sr.iris.user.core.service.interfaces.enums.UserLevelEnum;
import io.swagger.annotations.ApiModel;
import java.util.Map;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@ApiModel(value = "未报名团长导出信息")
@Slf4j
@ColumnWidth(15)
public class UnJoinTaskExportInfo {

    @ExcelProperty(value = "序号", index = 0)
    private int num;

    @ExcelProperty(value = "团长uid", index = 1)
    private String uid;

    @ExcelProperty(value = "团长昵称", index = 2)
    private String nickName;

    @ExcelProperty(value = "等级", index = 3)
    private String userLevel;

    @ExcelProperty(value = "导师uid", index = 4)
    private String tutorUid;

    @ExcelProperty(value = "导师昵称", index = 5)
    private String tutorNickName;

    @ExcelProperty(value = "所属区域", index = 6)
    private String area;


    public void readFromSearchResponseData(UnJoinTaskResponse response, Map<Long, String> orgMap) {

        this.setUid(response.getUid());
        this.setNickName(response.getNickName());
        this.setUserLevel(UserLevelEnum.getByValue(response.getUserLevel()).getDesc());
        this.setTutorUid(response.getTutorUid());
        this.setTutorNickName(response.getTutorNickName());
        
        this.setArea(orgMap.getOrDefault(response.getAreaId(), ""));
    }


}
